package jjn.carl.dp;

import java.util.Scanner;

/**
 * @author Jiang Jining
 * @since 2023-08-20 23:11
 */
public class LeetCode70_ClimbStairs {
    public int climbStairs(int n) {
        int[] dp = new int[n + 1];
        dp[0] = 1;
        for (int i = 1; i <= n; i++) {
            for (int j = 1; j <= 2; j++) {
                if (i >= j) {
                    dp[i] += dp[i - j];
                }
            }
        }
        return dp[n];
    }
    
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int n = scanner.nextInt();
        int stairs = new LeetCode70_ClimbStairs().climbStairs(n);
        System.out.println(stairs);
    }
}
